<template>
    <div>
        <NavBar :title="title"></NavBar>
        <van-address-list v-model="chosenAddressId" :list="list" :disabled-list="disabledList"
            disabled-text="以下地址超出配送范围" default-tag-text="默认" @add="onAdd" @edit="onEdit" />

    </div>
</template>

<script setup>
import NavBar from '@/components/NavBar.vue';
const title = '订单详情'
import { useRoute, useRouter } from 'vue-router';
const router = useRouter()
const route = useRoute()
import { ref } from 'vue';
console.log(route.params.orderId);
import { orderApi } from '@/api/api';
orderApi(route.params.orderId).then(res => {
    console.log(res);
    payData.value = [{
        orderId: res.data.data.orderId,
        subject: res.data.data.totalPrice,
        totalPrice: res.data.data.product_code,
    }]
})
import { payApi } from '@/api/api';
let payData = ref([])
const onAdd = () => {
    console.log(payData.value);

    payApi({ orderId: 'ioelc51x3d', subject: '123456', totalPrice: 99,}).res(res => {
            console.log(res);
            // window.open(res.data,'_break')
        })
}

</script>

<style lang="scss" scoped></style>